UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '53KUL1vcOqVA1Q/lAZzNNB6qMXVFRu4nPA/MVtFgoBE=' 
WHERE 
  key_id = '7eb1e241e76f634430bd8f62c6d44df2311b1bc5ab6ab0b517aac4be00bea711' 
  AND (
    token = '53KUL1vcOqVA1Q/lAZzNNB6qMXVFRu4nPA/MVtFgoBE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028