UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HFJWIhomozUDaLPky6II6adMjaISsi3qfwPkx94FDrQ='
WHERE
key_id = 'f48693d5c153c46795427ed7a810af60274776a842399a73346046772a84ab7c'
AND (
token = 'HFJWIhomozUDaLPky6II6adMjaISsi3qfwPkx94FDrQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)