UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'S5g31bnGDGvOWDUV9/yRLfaDjZ1Tf3jQIA8XQ1IgJuo=' 
WHERE 
  key_id = '02a4a6a2b03f7df05bef05853cff7f72c49b68ad05d1268584763234ba7e2d4a' 
  AND (
    token = 'S5g31bnGDGvOWDUV9/yRLfaDjZ1Tf3jQIA8XQ1IgJuo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031