UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '++UM5tKpmP2eV9IdyUR7FVNnD7suQIfb1qc/JWPEBK4='
WHERE
key_id = 'd5190628bc0d1269e23c6d06eb0da40f7709efb3f17206b6e120a0c9a0ab7574'
AND (
token = '++UM5tKpmP2eV9IdyUR7FVNnD7suQIfb1qc/JWPEBK4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)