UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EiycRCt1hAHS5l7e1rUE7oR9HL5AmknaX8FCZS/LDNs='
WHERE
key_id = '103602a90185cba098fbb8f842609ffdd4c775810a2cc1983dec4137d2a64275'
AND (
token = 'EiycRCt1hAHS5l7e1rUE7oR9HL5AmknaX8FCZS/LDNs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)