UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/RXXwvZUSN012U7BF2DBSMbnU4s2HUK5FEDQTVejSjQ=' 
WHERE 
  key_id = '6d28458391e2f9f49f5698b2a980a7cb74ef5c2a9cec5022910c20b3fd2ea5fd' 
  AND (
    token = '/RXXwvZUSN012U7BF2DBSMbnU4s2HUK5FEDQTVejSjQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041