UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+mjP+vR0W/2TiREy2GxJCUixVHwcM8Rjp8KClZx2R94='
WHERE
key_id = '04360e77ed7d45dc1ae2905fed00330663b59bf989b08edff8f93ca6aac7e735'
AND (
token = '+mjP+vR0W/2TiREy2GxJCUixVHwcM8Rjp8KClZx2R94='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)