UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'z/o/xBeJAkGRreR18J7m6ElmKVwHJ5YJuZVVSbAilMc='
WHERE
key_id = '6ea3634e6766454b951eaa397deaedf7126a359ec4c1c41cf971e85de5a62696'
AND (
token = 'z/o/xBeJAkGRreR18J7m6ElmKVwHJ5YJuZVVSbAilMc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)