UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2YcFe/N0jSg18n8pGi9qhCiXNGSL3jGKsrND2mFlfKo='
WHERE
key_id = '94c93a3307c5fcb866dc9bb41240801bd6c96e9b8ba52b2649eb0db714de26c8'
AND (
token = '2YcFe/N0jSg18n8pGi9qhCiXNGSL3jGKsrND2mFlfKo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)