UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'igs3k+vj2/qHxsq1qXOdS6dcI45lGHJP0M71Vpm1lEU='
WHERE
key_id = '885ef872b6cfc505fe4a774902fbc26bfb1093e4efa101a11fb8ddbaa05398ad'
AND (
token = 'igs3k+vj2/qHxsq1qXOdS6dcI45lGHJP0M71Vpm1lEU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)