UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rNRwTm8lLUuvYYsVnnlv6ya+dLPV/IoIrXYW1pufgxQ='
WHERE
key_id = 'cbb36f04ae6727554ddbf3e8ede7cd3a7db21f7322bd17218cae053587dd478e'
AND (
token = 'rNRwTm8lLUuvYYsVnnlv6ya+dLPV/IoIrXYW1pufgxQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)