UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'arLMi/KQUuLZ2JpcFcLGSPD/P9QPBq8gyQmUYkdEV2c='
WHERE
key_id = 'fb103ee58fe277569e512a465998ad238508873a8c938ac53b72647a17e63b1a'
AND (
token = 'arLMi/KQUuLZ2JpcFcLGSPD/P9QPBq8gyQmUYkdEV2c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)