UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LYljTMbS8kWoa0keMSTLp6XeTQfPrNhfimIm/96Bu1Q=' 
WHERE 
  key_id = '95aed3701870b553b6ef2a3b242f94fa19e4874023ca8eb2a4ae7721af5f18df' 
  AND (
    token = 'LYljTMbS8kWoa0keMSTLp6XeTQfPrNhfimIm/96Bu1Q=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00053