UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DlIlr+6ZzbxBfkoRaRoO1qta9CBy1wNOf04XqI9qW8w='
WHERE
key_id = '8b92e4fa69b4d7b9e68a4c81f8304e324cbe9ccd52abd6abb86f814a50289e6f'
AND (
token = 'DlIlr+6ZzbxBfkoRaRoO1qta9CBy1wNOf04XqI9qW8w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)