UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZvbwHGoSCxXfWiduFhP7eOuCP30lDNXOJJY2kiOEjBs='
WHERE
key_id = '276494ccd7307772332b4da8a331212978665b7847dcc02a54ec3e45cb159923'
AND (
token = 'ZvbwHGoSCxXfWiduFhP7eOuCP30lDNXOJJY2kiOEjBs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)