UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+PODdE73hBVZ6I0XHp7uGGJSz0FFwnOsvD5W956KdIQ='
WHERE
key_id = '98c8bd7d71bdccf6acef9731a4f211f5749794c453fc052200db36b1ff2569bf'
AND (
token = '+PODdE73hBVZ6I0XHp7uGGJSz0FFwnOsvD5W956KdIQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)