UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/DiWKO5AgZ/YsTtwF/Guvuq/jXrB+WFhBWN97ohCChs='
WHERE
key_id = '7ab8f00f82b8eaf097472462ddf89527f7a83d6a58bbbfc2b24d1a02358a7e2a'
AND (
token = '/DiWKO5AgZ/YsTtwF/Guvuq/jXrB+WFhBWN97ohCChs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)