UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yKqRti/NJ64ShcBSNwOdWekGoWmKR9ZkN0yoecYWhiY='
WHERE
key_id = '93d2bcdcb1f97a44b81c6c0567da6d0de9c84992dcef5da32f2aed88f3ac8136'
AND (
token = 'yKqRti/NJ64ShcBSNwOdWekGoWmKR9ZkN0yoecYWhiY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)