UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bF2ULV7LY9fvftxPhivJ2giPRhd1YL14bboI/1eOr+s='
WHERE
key_id = '7607f7656943b22445275369de1d850354cbb75033a38aa75b249051c75c6d2c'
AND (
token = 'bF2ULV7LY9fvftxPhivJ2giPRhd1YL14bboI/1eOr+s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)