UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zDpPcJh2fL7YXIVmmfJL9CqsHSBhKtD5vJa8hZMHjGA='
WHERE
key_id = '29aeb9e6c79fa3078c059ec901d8cb127d145c5310ae1b5a8c9f49fb200169ce'
AND (
token = 'zDpPcJh2fL7YXIVmmfJL9CqsHSBhKtD5vJa8hZMHjGA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)