UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'H5X02666CbVSFpQOv55SQPxppV/ZqSXWZf2RDpSGNoE='
WHERE
key_id = '077267fd9849f54f6b20d916664f0b6601d9c3661edd0814e01bbce7a9a8b132'
AND (
token = 'H5X02666CbVSFpQOv55SQPxppV/ZqSXWZf2RDpSGNoE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)