UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'sqkr06s3Z3GOMwWsMWB1biMMQMc+UPbZgHC5BvBiDeI=' 
WHERE 
  key_id = 'fcdc032dcbccc8a28215b812c8e2ca0b0b656fc58b77397cc8f164ac7620b89e' 
  AND (
    token = 'sqkr06s3Z3GOMwWsMWB1biMMQMc+UPbZgHC5BvBiDeI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018