UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MMextTpV6N2BCyA/aauAuaYPM2UladQ+xFUHzjC0w6Q='
WHERE
key_id = 'ea89e2d23b93cc66cf30bc84a18180dc04a2a5a30f17f9a8831d978cc8a8e26c'
AND (
token = 'MMextTpV6N2BCyA/aauAuaYPM2UladQ+xFUHzjC0w6Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)