UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LomJAIpyLyxZR7Sy+JjuftfCF3lTa7TcqtAptGYKmcw='
WHERE
key_id = '8e1c3576ed83e25ed8cdeca3d5423e114b337f79b1f71e0dde01ad06afd526fb'
AND (
token = 'LomJAIpyLyxZR7Sy+JjuftfCF3lTa7TcqtAptGYKmcw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)