UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+bP1+VJyUwdyIm2WMcBoF/peRYVJbBGHomMpqSdRprc=' 
WHERE 
  key_id = '09434b99622d761f5341caaaa45f3cb963c07a07322605be4ed330635f10cdb9' 
  AND (
    token = '+bP1+VJyUwdyIm2WMcBoF/peRYVJbBGHomMpqSdRprc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033