UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zMZ5cEOo/hRtUx7yO/mJghdSOmhUNKHoFmdugWZObRo='
WHERE
key_id = 'e69f216424176b2747da7b9155f989d9a47d07500b737a7c8ab67aa64515c6ac'
AND (
token = 'zMZ5cEOo/hRtUx7yO/mJghdSOmhUNKHoFmdugWZObRo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)