UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3hs6b3CSV7oXR/3NMfvaYbZ//yEWbozIGijjgq1JSk0='
WHERE
key_id = 'd3357e73509c61a4d2fbe035885dd89dab89b33d5623b4d4cd1ff8199ce9da68'
AND (
token = '3hs6b3CSV7oXR/3NMfvaYbZ//yEWbozIGijjgq1JSk0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)