UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kra4u1XTZgnuEo/4Yajv1dF6llVJnjWJv6RYwCJKgmo='
WHERE
key_id = '0658cae5d7673509242ef4de279936ac58b66ed97d05185273ce6e7efb056cf5'
AND (
token = 'kra4u1XTZgnuEo/4Yajv1dF6llVJnjWJv6RYwCJKgmo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)