UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'TqMrJMWctPgh8/+gQjBeMicG5gnLp36yjf9BljI1UUg=' 
WHERE 
  key_id = '72adbc82a0c5f30126dbbc20d2b895d85a3dfc8cbd81a8351ed59cbc63aad7fa' 
  AND (
    token = 'TqMrJMWctPgh8/+gQjBeMicG5gnLp36yjf9BljI1UUg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043