UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'B1aoC+KbCbDX2ClLb9OZh/lqv4kXf+wX0G/dqewtMGQ='
WHERE
key_id = '6a80e6406727bc50cbcb7e0c34cbc8aa0c78ebb5e03ca835000cd467fd283dcb'
AND (
token = 'B1aoC+KbCbDX2ClLb9OZh/lqv4kXf+wX0G/dqewtMGQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)