UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3Cq11h9+UIUncdOhKeBeiUe9cwqwXzIkS4gWnIHUvjw='
WHERE
key_id = '5e6f418017322261d289f51b3c0d035666197715394bde306c3a41af917ed390'
AND (
token = '3Cq11h9+UIUncdOhKeBeiUe9cwqwXzIkS4gWnIHUvjw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)